package service

import (
	"awesomeProject1/dao"
	"awesomeProject1/model"
)

type GoodService struct {
}

func (goodService *GoodService) GetGoods(shop_id int64) []model.Goods {
	//数据库操作去dao层进行，service层负责接收结果并处理返回给控制器
	goodDao := dao.NewGoodDao()
	goods, err := goodDao.QueryFoods(shop_id)
	if err != nil {
		return nil
	}

	return goods
}
